﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Collections;
using System.ComponentModel;

namespace AMatysiakTest
{   
    [TestClass]
    public class MultiColumnRuleTest
    {
        [TestMethod]
        public void creationTest()
        {
            MultiColumnRule rule = new MultiColumnRule(1, ListSortDirection.Ascending);
            Assert.AreEqual(1, rule.Key);
            Assert.AreEqual(ListSortDirection.Ascending, rule.Value);
        }

        [TestMethod]
        public void equalityTest()
        {
            MultiColumnRule rule1 = new MultiColumnRule(1, ListSortDirection.Ascending);
            MultiColumnRule rule2 = new MultiColumnRule(1, ListSortDirection.Ascending);
            Assert.AreEqual(rule1, rule2);
        }

        [TestMethod]
        public void notEqualityTest()
        {
            MultiColumnRule rule1 = new MultiColumnRule(1, ListSortDirection.Ascending);
            MultiColumnRule rule2 = new MultiColumnRule(2, ListSortDirection.Descending);
            Assert.AreNotEqual(rule1, rule2);
        }
    }
}
